import java.time.Duration;
import java.time.LocalDateTime;

public class DurationDemo {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime birthDate = LocalDateTime.of(1990, 1, 1, 8, 8, 8);
        Duration between1 = Duration.between(birthDate,now);
        System.out.println("between1 = " + between1);
        long days = between1.toDays();
        System.out.println("days = " + days);

    }

}
